<?php if($alert){ ?>

<!-- 
<div class="<?php echo $alert['type'];?>-block alertInfo">
    <?php echo($alert['msg']); ?>
    <a class="linkUrl">关闭</a>
</div> -->

<div class="alertBox"></div>

<script>
    $(function() {

        setTimeout(function(){
            $('.alertBox').html('<div class="<?php echo $alert['type'];?>-block alertInfo"><?php echo($alert['msg']); ?><a class="linkUrl">关闭</a></div>');
            $('.alertBox').slideDown();
        },500);

        setTimeout(function(){
            $('.alertBox').slideUp();
        },2500);

        $('.alertBox').on('click','.linkUrl',function(){
            $('.alertBox').slideUp();
        })
    })

    

</script>
<?php }?>